@import "../common/variables";
@import "../common/mixins";

.@{css-prefix} {
  &-cityselect {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 75%;
    background-color: #fff;
    z-index: @base-zindex * 1500 + 2;
    transform: translate(0, 100%);
    transition: transform .2s;
    &-active {
      transform: translate(0, 0);
    }
    &-move-animate {
      transition: transform .3s;
    }
    &-next {
      transform: translate(-50%, 0);
    }
    &-prev {
      transform: translate(0, 0);
    }
  }

  &-cityselect-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1;
    &:after {
      .bottom-line(#bdbdbd);
    }
  }

  &-cityselect-title {
    width: 100%;
    font-size: .3rem;
    text-align: center;
    height: 45px;
    line-height: 45px;
    position: relative;
    &:after {
      .bottom-line(@line-high-color);
    }
  }

  &-cityselect-nav {
    width: 100%;
    padding-left: 10px;
    overflow: hidden;
    display: flex;
    > a {
      font-size: 13px;
      color: #222;
      display: block;
      height: 40px;
      line-height: 46px;
      padding: 0 8px;
      position: relative;
      margin-right: 15px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 40%;
    }
    &-active {
      color: #F23030 !important;
      &:after {
        content: '';
        width: 100%;
        height: 2px;
        background-color: #F23030;
        position: absolute;
        bottom: 1px;
        left: 0;
        z-index: 2;
      }
    }
  }

  &-cityselect-content {
    height: 100%;
    padding-top: 85px;
    width: 100%;
    display: flex;
  }

  &-cityselect-item {
    display: block;
    height: inherit;
    width: 50%; /* for old android */
    flex: 0 0 50%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background-color: #FFF;
    &::-webkit-scrollbar {
      width: 0;
    }
    &:nth-child(2n) {
      background-color: #F5F5F5;
    }
    &-active {
      color: #F23030 !important;
      &:after {
        display: block;
        content: '\E600';
        font-family: @iconfont-inlay;
      }
    }
  }

  &-cityselect-item-box {
    width: 100%;
    height: inherit;
    display: block;
    padding: 0 20px;
    > a {
      color: #333;
      font-size: 13px;
      height: 40px;
      line-height: 40px;
      overflow: hidden;
      display: flex;
      align-items: center;
      width: 100%;
      position: relative;
      z-index: 1;
      &:before {
        .bottom-line(@line-color);
      }
      &:active {
        background: none; /* for firefox */
      }
      span {
        flex: 1;
        display: block;
        .line-clamp(2, 16px);
        font-size: 13px;
      }
    }
  }

  &-cityselect-loading {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .26rem;
    color: #999;
    svg {
      width: 36px;
      height: 36px;
    }
  }
}
